﻿using System;
using System.Collections.Generic;
using YNTK.Common.Filter;
using YNTK.Dependency;

namespace YNTK.Message.Entitys.Dto.Message
{
    /// <summary>
    /// 通知公告数据传输模型
    /// </summary>
    [SuppressSniffer]
    public class MessageListDto
    {
        /// <summary>
        /// 消息id
        /// </summary>
        public string messageId { get; set; }

        /// <summary>
        /// 当前用户是否为接收人
        /// </summary>
        public bool isReceive { get; set; }

        /// <summary>
        /// 所属机构id
        /// </summary>
        public string mechanismId { get; set; }

        /// <summary>
        /// 所属机构名称
        /// </summary>
        public string mechanismName { get; set; }

        /// <summary>
        /// 发送时间
        /// </summary>
        public DateTime? creatorTime { get; set; }

        /// <summary>
        /// 发件人id
        /// </summary>
        public string sendUserId { get; set; }

        /// <summary>
        /// 发件人姓名
        /// </summary>
        public string sendUserName { get; set; }

        /// <summary>
        /// 消息类型(0.平台公告 1.通知公告 2.系统消息 3.私信消息)
        /// </summary>
        public int type { get; set; }

        /// <summary>
        /// 消息类型文本
        /// </summary>
        public string typeText { get; set; }

        /// <summary>
        /// 接收对象类型(0.所有人 1.本机构 2.指定人员 3.特定机构)
        /// </summary>
        public int notice { get; set; }

        /// <summary>
        /// 接收对象类型文本
        /// </summary>
        public string noticeText { get; set; }

        /// <summary>
        /// 标题
        /// </summary>
        public string title { get; set; }

        /// <summary>
        /// 是否阅读
        /// </summary>
        public bool isRead { get; set; }

        /// <summary>
        /// 状态文本
        /// </summary>
        public string stateText { get; set; }
    }

    /// <summary>
    /// 通知公告信息传输模型
    /// </summary>
    [SuppressSniffer]
    public class MessageDto: MessageListDto
    {
        /// <summary>
        /// 正文
        /// </summary>
        public string bodyText { get; set; }

        /// <summary>
        /// 收件用户id集合,指定人员时才有
        /// </summary>
        public List<string> toUserIds { get; set; }

        /// <summary>
        /// 收件用户姓名,按逗号分割,指定人员时才有
        /// </summary>
        public string toUserNames { get; set; }

        /// <summary>
        /// 接收对象为特定机构时使用,机构id拼接上父级
        /// </summary>
        public List<string[]> toMechanismValue { get; set; }

        /// <summary>
        /// 接收机构名称,按逗号分割,特定机构时才有
        /// </summary>
        public string toMechanismNames { get; set; }

        /// <summary>
        /// 相关附件数据
        /// </summary>
        public List<CommonFileListDto> fileData { get; set; }
    }

}
